#ifndef STRINGLISTDEMO_H
#define STRINGLISTDEMO_H

#include <QDialog>

class QPushButton;
class QListView;
class QStringListModel;
class QDialogButtonBox;

class StringListDemo : public QDialog
{
	Q_OBJECT

public:
	StringListDemo(const QStringList &stringList,
		QWidget *parent = 0);

	int selectedId() const { return id; }
	void done(int result);

private slots:
	void insert();
	void append();
	void del();

private:
	void insertRow(int row);

private:
	int id;
	QPushButton *btnInsert;
	QPushButton *btnAppend;
	QPushButton *btnDel;
	QStringListModel *model;
	QListView *listView;
	QDialogButtonBox *buttonBox;
};

#endif // STRINGLISTDEMO_H
